home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / SciAn / src / machine.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  5KB  |  173 lines

  1. /*machine.h
  2.   Eric Pepke
  3.   May 29, 1991
  4.  
  5.   Defines some machine-specific stuff
  6. */
  7.  
  8. #ifndef _H_L_MACHINE
  9. #define _H_L_MACHINE
  10.  
  11. /*Names of libraries*/
  12. #define LIBMALLOC    "malloc"    /*Faster MALLOC library*/
  13. #define LIBHDF        "df"        /*NCSA HDF library*/
  14. #define LIBNETCDF    "netcdf"    /*NetCDF library*/
  15. #define LIBSUN        "sun"        /*sun library*/
  16. #define LIBRPCSVC    "rpcsvc"    /*rpcsvc library*/
  17. #define LIBJPEG        "CLRjpeg4"    /*JPEG library*/
  18.  
  19. /*Supported machine types*/
  20. #define IRIS4D          1               /*Silicon Graphics IRIS 4D*/
  21. #define RS6000          2               /*IBM RS-6000*/
  22. #define CRAYYMP        3        /*Cray Y/MP (computation only)*/
  23. #define CONVEX        4        /*Convex*/
  24.  
  25. /*Attempt to guess the machine type based on built-in processor directives*/
  26. #ifdef sgi
  27. #define MACHINE         IRIS4D          /*4D cpp defines sgi*/
  28. #else
  29. #ifdef __sgi
  30. #define MACHINE        IRIS4D        /*-ansi cpp defines sgi*/
  31. #else
  32. #define MACHINE         RS6000          /*Must be a 6000*/
  33. #endif
  34. #endif
  35.  
  36. /*If this machine cannot be guessed, put in a #define MACHINE here*/
  37.  
  38. /*Depending on the machine, define (or don't) the following flags:
  39.         GL4D            GL library as defined on the IRIS4D is present
  40.         FMATH           math routines have float as well as double versions
  41.     MATHF        math routines have float with f at end
  42.         FONTS4D         fonts as defined on the IRIS4D are present
  43.         CURSORS4D       cursors as defined on the IRIS4D are present
  44.     MENUS4D        menus are done using GL as on the IRIS4D
  45.     MENUSGLOVER    menus are done using GL overlay planes, if possible
  46.     WINDOWS4D    windows are defined as on the IRIS4D
  47.         IRISNTSC        NTSC functions as defined on the IRIS4D are present
  48.         IRIS            the machine is some kind of IRIS, 4D or not
  49.         PROTO           use ANSI C prototypes (never been tested without)
  50.         DIRENT          Directory is struct dirent else it is struct direct
  51.     FORTRAN_    FORTRAN routines need an underscore after the name
  52.     SOCKETS        sockets are available and are to be used
  53.     STDLIB        stdlib.h is present
  54.     INTERWINDRAG    can drag between windows
  55.     WINNOCLOSE    never actually close windows, just hide 'em    
  56.     GETPWNAM    use getpwnam call to determine ~name
  57.     MENUSFROM0    menus items are defined starting from 0 instead of 1     
  58.     NOHIDEFRAME    cannot hide window frames
  59.     GRAPHICS    version has graphics at all
  60.     INTERACTIVE    version has interactive functions at all
  61.     TERMIO        machine has terminal IO, needed for some recorders
  62.     SELNEWWINDOWS    select new windows when they are created
  63.     BIGFONTSOK    big bit-mapped fonts are OK
  64.     GETGDESCAFTER    must do all "getgdesc" after config, bug in IBM GL
  65.     NEEDSGAMMA    machine doesn't do gamma correction, needs it.
  66.     IBMORTHO    ortho and ortho2, funny for IBM
  67.     DONTCLIP    don't try to clip windows to draw minimum possible
  68.     CHANGECURSOR    change cursor when it moves from window to window
  69.     DIALBOX        use dial box, if connected
  70.     GRAPHOBJ    use graphical objects, if available
  71.  
  72.             The following variables are set by ScianPreInstall
  73.             in machine.*.h
  74.     HDFDEF        HDF library is defined
  75.     HDF31        HDF version 3.1 or earlier is present
  76.     NETCDFDEF    netCDF library is defined
  77.         MALLOCH         there is a malloc.h available and we're using the lib
  78.     FORTRAN        we want to compile with FORTRAN
  79. */
  80.  
  81. #if MACHINE == IRIS4D
  82.  
  83. #define GL4D
  84. #define MATHF
  85. #define FONTS4D
  86. #define CURSORS4D
  87. #define IRISNTSC
  88. #define IRIS
  89. #define PROTO
  90. #define SOCKETS
  91. #define FORTRAN_
  92. #define STDLIB
  93. #define INTERWINDRAG
  94. #define GETPWNAM
  95. #define MENUS4D
  96. #define WINDOWS4D
  97. #define GRAPHICS
  98. #define INTERACTIVE
  99. #define TERMIO
  100. #define BIGFONTSOK
  101. #define DIALBOX
  102. #define GRAPHOBJ
  103.  
  104. #else
  105. #if MACHINE == RS6000
  106.  
  107. #define GL4D
  108. #define PROTO
  109. #define GETPWNAM
  110. #define NOHIDEFRAME
  111. #define INTERWINDRAG
  112. #define MENUS4D
  113. #define WINDOWS4D
  114. #define GRAPHICS
  115. #define INTERACTIVE
  116. #define TERMIO
  117. #define STDLIB
  118. #define SELNEWWINDOWS
  119. #define GETGDESCAFTER
  120. #define NEEDSGAMMA
  121. #define IBMORTHO
  122. #define DONTCLIP
  123. #define SOCKETS
  124. #define DIALBOX
  125. #define GRAPHOBJ
  126.  
  127. /* Insert a #define MENUSFROM0 for version 3.1.5 */
  128.  
  129. #undef _ANSI_C_SOURCE            /*Gotta do this; I don't know why.*/
  130. #define DIRENT
  131.  
  132. #else
  133. #if MACHINE == CONVEX
  134.  
  135. #define PROTO
  136. #define FORTRAN_
  137. #define MATHF
  138. #define SOCKETS
  139. #define STDLIB
  140. #define COMPONLY
  141.  
  142. #else
  143.  
  144. Hey!  No machine is defined!
  145. #endif
  146. #endif
  147. #endif
  148.  
  149. #endif
  150.  
  151. /*Include stuff for FORTRAN*/
  152. #include "machine.fortran.h"
  153.  
  154. /*Include stuff for hdf library*/
  155. #include "machine.hdf.h"
  156.  
  157. /*Include stuff for netCDF library*/
  158. #include "machine.netcdf.h"
  159.  
  160. /*Include stuff for JPEG library*/
  161. #include "machine.jpeg.h"
  162.  
  163. /*Include stuff for malloc library*/
  164. #include "machine.malloc.h"
  165.  
  166. /*Include extras*/
  167. #include "machine.extras.h"
  168.  
  169. /*Release version.  Don't change this.*/
  170. #if 1
  171. #define RELEASE
  172. #endif
  173.